﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AcessaDadosBD;
using AcessaDadosBD.Repositorios;
using System.Data.OleDb;

namespace docTissV2Console
{
    class Program
    {
        static void Main(string[] args)
        {
            OleDbCommand cmd;

            OleDbConnection connection = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\app_Data\docTissBDv2.accdb;Persist Security Info=True");

            cmd = new OleDbCommand();
            cmd.Connection = connection;
        
            GuiaFaturamentoRepository repositorioGuia = new GuiaFaturamentoRepository(cmd);

            GuiaFaturamento novaGuia = new GuiaFaturamento()
            {
                NumeroGuia = "12345678900987654321",
                Local = "C:\\",
                IDLoteGuia = 1
            };

            int codigoRetorno = repositorioGuia.Insert(novaGuia);
        
        }
    }
}
